<?php require 'common/header.php';?>
<?php require 'common/left.php';?>
<div id="main-content">
  <h2>欢迎您 <?php echo $_COOKIE['adminname'];?></h2>
  <p id="page-intro">漏洞管理。</p>
  <div class="clear"></div>
  <div class="content-box">
    <div class="content-box-header">
      <h3>漏洞管理</h3>
      <div class="clear"></div>
    </div>
    <div class="content-box-content">
      <div class="tab-content default-tab" id="tab1" style="display: block;">
        <div class="form">
          <form id="js-form" method="post" action="<?php echo Qtpl::createUrl('bug', 'index','','admin');?>">
            <fieldset class="clearfix"><p>关键字：<span>
                <input type="text" value="<?php echo $_tpl['key'];?>" class="text-input small-input" name="key">
                &nbsp;<small>漏洞名称，内容，用户名称</small>&nbsp;
                <input type="hidden" value="5" name="c" />
                <input type="submit" name="" id="button" class="button" value="查询">
                </span> </p>
            </fieldset>
          </form>
        </div>
        <hr>
        <table>
          <thead>
            <tr>
              <th>编号</th>
              <th>名称</th>
              <th>类型</th>
              <th>等级</th>
              <th>评分</th>
              <th>状态</th>
              <th>提交时间</th>
              <th>操作</th>
            </tr>
          </thead>
          <tfoot>
            <tr>
              <td colspan="8"><?php echo Qtpl::paged($_tpl['pageSize'],core_lib_constant::PAGE_NUM,$_tpl['page'],'bug','index','style','admin');?></td>
            </tr>
          </tfoot>
          <tbody>
          <?php 
          if($_tpl['bug']){
          	foreach ($_tpl['bug'] as $k=>$v) {
          		$altrow = $k/2 == 0 ? 'alt-row' : '';
          ?>
           <tr class="<?php echo $altrow;?>">
            <td><?php echo Qutil::enId($v['bid']);?></td>
            <td><?php echo $v['title'];?></td>
            <td><?php echo $v['cate_name'];?></td>
            <td><?php echo Qtpl::getLevel($v['level']).'/'.Qtpl::getLevel($v['sure_level']);?></td>
            <td><?php echo $v['rank'].'/';echo $v['sure_rank'] ? $v['sure_rank'] : '无';?></td>
            <td><?php echo $v['is_sure'] == 1 ? '已确认' : $v['is_ignore'] == 1 ? '已忽略' : "未处理";?></td>
            <td><?php echo $v['create_ymd'];?></td>
            <td><a href="<?php echo Qtpl::createUrl('bug', 'show',array('bid'=>$v['bid']),'admin');?>">操作</a></td>
          <?php
          		}
          	}else{
          		echo '<td colspan="8">暂无内容</td>';
          	}
          ?>
          </tr>
         </tbody>
        </table>
      </div>
    </div>
  </div>
<?php require 'common/footer.php';?>